package com.anuyun.ms.common;

import java.io.Serializable;


public class Result<T> implements Serializable{

	private static final long serialVersionUID = 6637887136027224579L;

	private static final String SUCCESS = "success";
	

	private int code;
	private String msg;
	private T data;

	public Result() {
		code = 0;
		msg = SUCCESS;
	}

	public Result(T data) {
		code = 0;
		msg = SUCCESS;
		this.data = data;
	}

	public Result(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	

}
